<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>时间之线 - 爱美文网</title>
        <link rel="shortcut icon" href="/favicon.png?2" type="image/x-icon" />
        <link rel="stylesheet" href="/layui/dist/css/layui.css?<?=$version?>">
        <link rel="stylesheet" href="/site.css?<?=$version?>">
    </head>
    <body>
        <!-- 你的HTML代码 -->
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->          

        <?php require TPL_PATH . 'home/header.html'; ?>

        <div class="layui-container">

            <!--页面内容-->
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>时间之线</legend>
                <div class="layui-field-box">
                    <div class="layui-row page-content-div" style="margin-top: 0 !important;">
                        <div class="page-content layui-col-md6">
                            <ul class="layui-timeline">
                                <li class="layui-timeline-item">
                                    <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                    <?php foreach($list as $year => $data):?>
                                    <?php if($data):?>
                                    <div class="layui-timeline-content layui-text">
                                        <h3 class="layui-timeline-title" style="margin-top: 10px;"><?=$year?></h3>
                                        <ul>
                                            <?php foreach($data as $d):?>
                                            <li style="font-size: 16px; margin-top: 8px;">
                                                《<a href="/post/<?=$d['post_id']?>" target="_blank" style="text-decoration: underline #009688 dashed !important; color: #666;">
                                                    <?=$d['title']?>
                                                </a>》 - <?=$d['author']?> 
                                                <span style="display: inline-block; font-style: initial; margin-left: 12px; color: gray;">
                                                    <?=date('Y-m-d', $d['input_time'])?>
                                                </span>
                                            </li>
                                            <?php endforeach;?>
                                        </ul>
                                    </div>
                                    <?php endif;?>
                                    <?php endforeach;?>
                                </li>
                            </ul>
                        </div>
                    </div>                    
                </div>
            </fieldset>

            <?php require TPL_PATH . 'home/footer.html'; ?>

        </div>
        <script src="/layui/dist/layui.js?<?=$version?>"></script>
        <script src="/site.js?<?=$version?>"></script> 
    </body>
</html>